﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCDonHang.ascx.cs" Inherits="FDeal.WUC.WUCDonHang" %>
<asp:GridView ID="gvDonHang" runat="server" AllowPaging="True" 
    AutoGenerateColumns="False" BackColor="#CCCCFF" DataKeyNames="IDDONHANG" 
    onrowcancelingedit="gvDonHang_RowCancelingEdit" 
    onrowdeleting="gvDonHang_RowDeleting" onrowediting="gvDonHang_RowEditing" 
    onrowupdating="gvDonHang_RowUpdating">
    <Columns>
        <asp:TemplateField HeaderText="Mã Đơn Hàng">
            <EditItemTemplate>
                <asp:TextBox ID="tbMaDonHang" runat="server" Height="20px" 
                    Text='<%# Bind("IDDONHANG") %>' Width="70px"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="lb1" runat="server" Text='<%# Bind("IDDONHANG") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Mã Sản Phẩm">
            <EditItemTemplate>
                <asp:TextBox ID="tb2" runat="server" Height="20px" Text='<%# Bind("IDDEAL") %>' 
                    Width="70px"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# Bind("IDDEAL") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Số Lượng">
            <EditItemTemplate>
                <asp:TextBox ID="tbSoLuong" runat="server" Height="20px" 
                    Text='<%# Bind("SOLUONG") %>' Width="20px"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label3" runat="server" Text='<%# Bind("SOLUONG") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Tổng Giá">
            <EditItemTemplate>
                <asp:TextBox ID="tbTongGia" runat="server" Height="20px" 
                    Text='<%# Bind("TONGGIA") %>' Width="50px"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="lbl4" runat="server" Text='<%# Bind("TONGGIA") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Địa Chỉ Nhận">
            <EditItemTemplate>
                <asp:TextBox ID="tbDiaChiNhan" runat="server" Height="20px" 
                    Text='<%# Bind("DIACHINHAN") %>' Width="120px"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label5" runat="server" Text='<%# Bind("DIACHINHAN") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Hình Thức Nhận Hàng">
            <EditItemTemplate>
                <asp:TextBox ID="tbHinhThucNhanHang" runat="server" Height="20px" 
                    Text='<%# Bind("HINHTHUCNHANHANG") %>' Width="60px"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label6" runat="server" Text='<%# Bind("HINHTHUCNHANHANG") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Trạng Thái">
            <EditItemTemplate>
                <asp:TextBox ID="tbTrangThai" runat="server" Text='<%# Bind("TRANGTHAI") %>' 
                    Width="70px"></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("TRANGTHAI") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:CommandField ButtonType="Image" CancelImageUrl="~/images/cancel.png" 
            EditImageUrl="~/images/Edit.png" ShowEditButton="True" 
            UpdateImageUrl="~/images/update.png" />
        <asp:CommandField ButtonType="Image" CancelImageUrl="~/images/Delete.png" 
            DeleteImageUrl="~/images/Delete.png" SelectImageUrl="~/images/Delete.png" 
            ShowDeleteButton="True" />
    </Columns>
</asp:GridView>

